
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Security.Cryptography;

using Plain;
using Plain.Data;
using Plain.Search;
using Plain.Web.Mvc.Controllers;

using Plain.Demo.Blog.Business;
using Plain.Demo.Blog.Web;

namespace Plain.Demo.Blog.Web.UI
{
	[HandleError]
	public class UserController : PlainController<User>
	{
		public ActionResult Edit (User user){
			return View(user);
		}
		
		[ValidateInput(false)]
		[AcceptVerbs(HttpVerbs.Post)]
		public ActionResult Edit(int id, User user){
			try {
				user.Save ();
				return RedirectToAction ("Index","Post");
			} catch {
				return View ();
			}
		}
	}
}